home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Meeting Pearls 2
/
Meeting Pearls Vol. II (1995)(GTI - Schatztruhe)[!].iso
/
Pearls
/
text
/
SoundBox
/
bonus
/
dt_delmod.rexx
next >
Wrap
OS/2 REXX Batch file
|
1994-12-21
|
4KB
|
120 lines
/* DT-ARexx-Script
Kopieren, Entfernen eines Modules mit ninjiDT
$VER: dt_delmod.rexx 0.8 (16.11.94) ©1994 ninji :-)
*/
options results
copy_dest_pt = ""
copy_dest_tfmx = ""
copy_dest_hip = ""
copy_dest_other = ""
mode_xpk = ""
remark = ""
pt_player = "ProTracker NoiseTracker SoundTracker15"
tfmx_player = "TFMX TFMX_7V TFMX_Pro"
hippel_player = "Hippel Hippel-Coso"
reqtitle = "delmodDT @ninji"
file_prefs = "S:ninjiDT.prefs"
delete = 1
move = 2
disk = 3
error = 0
/* looking for some destinations */
if exists(file_prefs) then do
call open(file, file_prefs, read)
do while ~eof(file)
string = readln(file)
select
when (word(string,1) == 'COPY_DEST_PT') then
copy_dest_pt = substr(string,wordindex(string,2))
when (word(string,1) == 'COPY_DEST_TFMX') then
copy_dest_tfmx = substr(string,wordindex(string,2))
when (word(string,1) == 'COPY_DEST_HIP') then
copy_dest_hip = substr(string,wordindex(string,2))
when (word(string,1) == 'COPY_DEST_OTHER') then
copy_dest_other = substr(string,wordindex(string,2))
when (word(string,1) == 'MODE_XPK') then do
mode_xpk = word(string,2)
remark = '0A'x || 'XPK-Mode:' mode_xpk
end
otherwise
end
end
call close(file)
end
if (copy_dest_other == "") then copy_dest_other = "RAM:"
address DELITRACKER
status m dir ;mod_dir = result
status m fil ;mod_file = result
status m num ;mod_number = result
status m fmt ;mod_fmt = result
select
when (pos(mod_fmt,pt_player) ~= 0) then dest = copy_dest_pt
when (pos(mod_fmt,tfmx_player) ~= 0) then dest = copy_dest_tfmx
when (pos(mod_fmt,hippel_player) ~= 0) then dest = copy_dest_hip
otherwise dest = copy_dest_other
end
if (dest == "") then dest = "RAM:"
remark = 'Typ:' mod_fmt || '0A'x || 'nach:' dest || remark
status m pnr ;pnr_num = result
'status p' pnr_num 'sub'
if (result = "yes") then remark = remark || '0A'x || "(Achtung! Subsongs möglich)"
/* RexxReqTools-Support */
call addlib("rexxreqtools.library", 0, -30, 0)
call rtezrequest( '"' mod_dir || mod_file || '"' || '0A'x || remark,,
"L_öschen|_Copy/Move|_DF0:|_Ach?!",,
reqtitle,,
"rt_idcmpflags=idcmp_diskinserted rtez_defaultresponse=2 rtez_flags=ezreqf_centertext",,
action)
/* deleting or copying files */
if (action ~= 0) then do
'clearlist ' mod_number
'playpause'
if (action ~= delete) then do
if (action == disk) then do
rtezrequest( "Bitte Diskette in DF0: einlegen",,
,reqtitle,,
"rt_idcmpflags=idcmp_diskinserted")
dest = "DF0:"
end
address command
/* now's time to handle files */
say mode_xpk
if (mode_xpk ~= "") then 'xPack >NIL: "' || mod_dir || mod_file || '" METHOD' mode_xpk
else 'xPack >NIL: "' || mod_dir || mod_file || '"'
error = rc
if (~error) then do
'copy >NIL: "' || mod_dir || mod_file ||,
'" "' || dest || mod_file || '" noreq clone'
error = rc
end
address
end
if (error ~= 0) then do
call rtezrequest( "Kopieren war nicht erfolgreich," || '0A'x ||,
"Modul aber aus Liste entfernt ...",,
"Hmmmm...",,
reqtitle)
end
else do
call rtezrequest('"' || mod_dir || mod_file || '" Löschen?',,
"Kl_ar doch!|_Ooops...",,
reqtitle,,
,loesch)
if (loesch) then
address command 'delete "' || mod_dir || mod_file || '"'
end
end